package com.ruoyi.ai.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@AllArgsConstructor
@Getter
public enum PublishStatus {
    UN_PUBLISH(0,"待发布"),
    PUBLISH(1, "已发布"),
    ;
    private Integer status;
    private String desc;

    public static PublishStatus getByStatus(Integer status){
        return Arrays.stream(values()).filter(c-> c.getStatus().equals(status)).findFirst().orElse(null);
    }
}
